 /******************************************************************************
This .do file produces the distributitions of the norm measures (Figure OA1).
******************************************************************************/

clear
use "ess_cleaned_whole.dta"
set more off

*Restrict to citizens
keep if citizen == 1

*rename variables to make the reshape command work 
 
rename vote_elections duty1
rename beactive duty2
rename volunteer duty3
rename obey duty4
rename opinions duty5
rename support_others duty6

 
*reshape
gen id = _n
reshape long duty, i(id) j(norm)
label def nrm 1 "Vote in Elections" 2 "Be Active in Politics" 3 "Volunteer" 4 "Obey Laws" 5 "Form Own Opinions" 6 "Support Others"
label values norm nrm

*histogram

histogram duty, by(norm, note("")) scheme(plottig) discrete xlabel(0(1)10) fraction xtitle("")
graph save "norms_distribution.gph"
graph export "norms_distribution.png"
 
